import config from "@/config"
import http from "@/utils/request"

export default {
    page: {
        url: `${config.API_URL}/business/column/page`,
        name: "分页列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    dicList: {
        url: `${config.API_URL}/business/column/dicList`,
        name: "字典列表",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    detail: {
        url: `${config.API_URL}/business/column/detail`,
        name: "详情",
        get: async function (params) {
            return await http.get(this.url, params);
        }
    },
    add: {
        url: `${config.API_URL}/business/column/add`,
        name: "新增",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    update: {
        url: `${config.API_URL}/business/column/update`,
        name: "修改",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    delete: {
        url: `${config.API_URL}/business/column/delete`,
        name: "删除",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    batchDelete: {
        url: `${config.API_URL}/business/column/batchDelete`,
        name: "批量删除",
        post: async function (params) {
            return await http.post(this.url, params);
        }
    },
    columnEdit: {
		url: `${config.API_URL}/business/column/columnEdit`,
		name: "栏目下关联编辑",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	unColumnEdit: {
		url: `${config.API_URL}/business/column/unColumnEdit`,
		name: "栏目未关联编辑",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	grantColumnEdit: {
		url: `${config.API_URL}/business/column/grantColumnEdit`,
		name: "关联栏目编辑",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	cancelColumnEdit: {
		url: `${config.API_URL}/business/column/cancelColumnEdit`,
		name: "取消关联栏目编辑",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
}